package com.cs.controller;


import com.cs.resultvo.Result;
import com.cs.service.ISystemPriceService;
import com.cs.service.impl.SystemPriceServiceImpl;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 * 运费价格体系  前端控制器
 * </p>
 *
 * @author baomidou
 * @since 2022-06-07 06:17:08
 */
@RestController
@RequestMapping("/systemPrice")
public class SystemPriceController {
    @Autowired
    private ISystemPriceService systemPriceService;
    @ApiOperation(value = "模板导出(全部导出)", httpMethod = "GET")
    @GetMapping(value = "/ps/download")
    public Result export( HttpServletResponse response) {
        try {
            systemPriceService.exportPsData(response,29);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return Result.ok();
    }
}

